home *** CD-ROM | disk | FTP | other *** search
- Path: news.MediaCity.com!usenet
- From: Hal Hildebrand <halh@polymorphicSoftware.com>
- Newsgroups: comp.lang.c++,comp.lang.smalltalk
- Subject: Re: Will Java kill C++?
- Date: Wed, 17 Apr 1996 18:22:25 -0700
- Organization: Polymorphic Software, Inc.
- Message-ID: <31759951.6E0@polymorphicSoftware.com>
- References: <3134D499.653E@ix.netcom.com> <4kbfn8$1bu@news1.is.net> <4kqjf6$kh0@kaiwan009.kaiwan.com> <317173F1.5790@concentric.net> <Dpz6It.2An@undergrad.math.uwaterloo.ca>
- NNTP-Posting-Host: easy3.mediacity.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.01 (WinNT; I)
-
- Carl Laurence Gonsalves wrote:
- > Both factorial and fibonacci are tail-recursive, which means that your
- > translator may be doing tail recursion elimination, folding your n message
- > sends (or function calls) down to one (plus a loop).
- >
- > I don't know of any C compilers that do tail recursion elimination. I
- > don't know enough about the workings of Smalltalk to say for sure, but it
- > may be possible that your translator is doing tail recursion elimination,
- > thereby making message sends seem to be a heck of a lot more efficient
- > than they really are.
- >
- > Try doing a similar test with functions that aren't tail-recursive. Or at
- > least find out if your Smalltalk translator may be doing tail-recursion
- > elimination.
-
- Nice try. Smalltalk can't eliminate tail recursion for all the
- reasons that it is claimed to be slow. No type information...
- -Hal
- --
- When the going gets strange,
- the strange ask for royalties
-
- Polymorphic Software, Inc.
- halh@polymorphicSoftware.com
- http://www.polymorphicSoftware.com
-